<!DOCTYPE html>
<html>
<head>
<style>
:root {
  font: 10px Ahem;
}
</style>
</head>
<body>
<template id="target-template">
<svg width="200px" height="300px" viewBox="0 0 1500 1000">
  <marker class="target" />
</svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
'use strict';
assertAttributeInterpolation({
  property: 'markerWidth',
  from: '1',
  to: '6'
}, [
  {at: -0.4, is: 0},
  {at: 0, is: 1},
  {at: 0.2, is: 2},
  {at: 0.6, is: 4},
  {at: 1, is: 6},
  {at: 1.4, is: 8}
]);
assertAttributeInterpolation({
  property: 'markerWidth',
  from: '10pt',
  to: '5pc'
}, [
  {at: -0.4, is: '0pt'},
  {at: 0, is: '10pt'},
  {at: 0.2, is: '20pt'},
  {at: 0.6, is: '40pt'},
  {at: 1, is: '60pt'},
  {at: 1.4, is: '80pt'}
]);
assertAttributeInterpolation({
  property: 'markerWidth',
  from: '15%',
  to: '23em'
}, [
  {at: -1000, is: 0},
  {at: -0.4, is: 223},
  {at: 0, is: 225},
  {at: 0.2, is: 226},
  {at: 0.6, is: 228},
  {at: 1, is: 230},
  {at: 1.4, is: 232}
]);
assertAttributeInterpolation({
  property: 'markerWidth',
  from: '10rem',
  to: '60rem'
}, [
  {at: -0.4, is: '0rem'},
  {at: 0, is: '10rem'},
  {at: 0.2, is: '20rem'},
  {at: 0.6, is: '40rem'},
  {at: 1, is: '60rem'},
  {at: 1.4, is: '80rem'}
]);
assertAttributeInterpolation({
  property: 'markerWidth',
  from: '10ch',
  to: '20rem'
}, [
  {at: -0.4, is: '60'},
  {at: 0, is: '10ch'},
  {at: 0.2, is: '120'},
  {at: 0.6, is: '160'},
  {at: 1, is: '20rem'},
  {at: 1.4, is: '240'}
]);
</script>
</body>
</html>
